--- See 'https://github.com/Frege/frege/issues/80 the corresponding issue'
module tests.comp.Issue80 where

g :: ((forall b. [b] → [b]) → Int) → Int
g f = undefined

 
k1 :: (forall a. a -> a) -> Int
k1 f = undefined
 
k2 :: ([Long] -> [Long]) -> Int
k2 = undefined


-- dosNotWork = g k1

shouldBeInt = g k2

type I c  = forall e. c e →  c e

data T (b ∷ * → *) = 
    TA (forall 𝖆.b 𝖆 -> b 𝖆)
    | TB (I b)
    | TC { func :: forall 𝖉.Num 𝖉 => b 𝖉 -> b 𝖉 }
    | TD { fund :: I Maybe } where
        a ←→ b = a b

infix 5 T.←→


y = TB reverse
z = TC (fmap (1+))

-- x :: T (𝖟 :: * → *)
x = TD (fmap id)

main = println (z.func (Just 42))
-- z = TC Int.abs
